Inspect image data, smooth to remove noise and save channel in interest.


In [1]:
%run ../common.ipynb


Populating the interactive namespace from numpy and matplotlib

In [2]:
image = imread('../MP.tiff')

In [3]:
image.shape


Out[3]:
(2111, 2198, 4)

In [5]:
image[:,:,0].shape


Out[5]:
(2111, 2198)

In [16]:
imshow(image[:,:,0])


Out[16]:
(<matplotlib.figure.Figure at 0x10d6d2f50>,
 <matplotlib.axes._subplots.AxesSubplot at 0x10d6cd3d0>,
 <matplotlib.image.AxesImage at 0x10d740310>)

In [14]:
image[100:110,100:110,3]


Out[14]:
array([[255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
       [255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
       [255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
       [255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
       [255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
       [255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
       [255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
       [255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
       [255, 255, 255, 255, 255, 255, 255, 255, 255, 255],
       [255, 255, 255, 255, 255, 255, 255, 255, 255, 255]], dtype=uint8)

In [17]:
imsave('../MP.tiff', smooth(image[:,:,0]))